/** When your routing table is too long, you can split it into small modules **/

import Layout from '@/layout'

const productRouter = {
  path: '/product',
  component: Layout,
  name: '商品管理',
  meta: {
    title: '商品管理',
    subtitle: '商品',
    icon: 'commodity'
  },
  children: [
    // 模拟三级路由
    {
      path: '',
      component: Layout,
      name: '商品设置',
      meta: { title: '商品设置', subtitle: '资料', icon: 'menu_product'},
      childrens: [
        {
          path: '/productCategory/list',
          meta: { title: '商品分类',subtitle:'分类', icon: 'menu_product', permissions: ['productCategory.query']}
        },
        {
          path: '/brand/list',
          meta: { title: '品牌类型',subtitle:'品牌', icon: 'menu_product', permissions: ['brand.query'] }
        },
        {
          path: '/freight/list',
          meta: { title: '运费模板', subtitle:'运费',icon: 'menu_freight', permissions: ['freight.query'] }
        }
      ]
    },
    {
      path: '',
      component: Layout,
      name: '商品管理',
      meta: { title: '商品管理', subtitle: '管理', icon: 'menu_product'},
      childrens: [
        {
          path: '/product/list',
          meta: { title: '商品档案',subtitle:'商品', icon: 'menu_product', permissions: ['product.query'] ,color:'true'}
        },
        {
          path: '/waterTicket/list',
          meta: { title: '水票管理', subtitle: '水票', icon: 'menu_waterTicket', permissions: ['waterTicket.query'] }
        },
        {
          path: '/pledge/list',
          meta: { title: '空桶管理', subtitle: '水票', icon: 'menu_waterTicket', permissions: ['pledge.query'] }
        },
        // {
        //   path: '/scenicspot/list',
        //   meta: { title: '旅游线路', subtitle: '线路', icon: 'menu_waterTicket', permissions: ['tourist.query'] }
        // },
        // {
        //   path: '/jdProduct/list',
        //   meta: { title: '京东商品', subtitle: '京东', icon: 'menu_product', permissions: ['product.query'] }
        // },
      ]
    },
    {
      path: '',
      component: Layout,
      name: '商品查询',
      meta: { title: '商品查询', subtitle: '查询', icon: 'menu_product'},
      childrens: [

      ]
    },
    // 路由注册
    {
      path: '/jdProduct/list',
      component: () => import('@/views/jdProduct/list'),
      name: 'jdProduct-list',
      meta: { title: '京东商品',subtitle:'京东商品', icon: 'menu_product', permissions: ['product.query'] },
      hidden: true
    },
    {
      path: '/jdProduct/edit',
      component: () => import('@/views/jdProduct/edit'),
      name: 'jdProduct-edit',
      meta: { title: '京东商品详情',subtitle:'京东商品详情', icon: 'menu_product', permissions: ['product.query'] },
      hidden: true
    },
    {
      path: '/pledge/list',
      component: () => import('@/views/pledge/list'),
      name: 'pledge-list',
      meta: { title: '空桶管理',subtitle:'品牌', icon: 'menu_product', permissions: ['pledge.query'] },
      hidden: true
    },
    {
      path: '/pledge/edit',
      component: () => import('@/views/pledge/edit'),
      name: 'pledge-edit',
      meta: { title: '修改空桶', icon: 'menu_product' },
      hidden: true
    },
    {
      path: '/brand/list',
      component: () => import('@/views/brand/list'),
      name: 'brand-list',
      meta: { title: '品牌类型',subtitle:'品牌', icon: 'menu_product', permissions: ['brand.query'] },
      hidden: true
    },
    {
      path: '/brand/add',
      component: () => import('@/views/brand/add'),
      name: 'brand-add',
      meta: { title: '新增品牌', icon: 'menu_product' },
      hidden: true
    },
    {
      path: '/brand/edit',
      component: () => import('@/views/brand/edit'),
      name: 'brand-edit',
      meta: { title: '修改品牌', icon: 'menu_product' },
      hidden: true
    },
    {
      path: '/product/list',
      component: () => import('@/views/product/list'),
      name: 'product-list',
      meta: { title: '商品档案',subtitle:'商品', icon: 'menu_product', permissions: ['product.query'] ,color:'true'},
      hidden: true
    },
    {
      path: '/meal/list',
      component: () => import('@/views/meal/list'),
      name: 'meal-list',
      meta: { title: '套餐设置', subtitle: '套餐', icon: 'menu_freight', permissions: ['meal.query'] },
      hidden: true
    },
    {
      path: '/waterTicket/list',
      component: () => import('@/views/waterTicket/list'),
      name: 'waterTicket-list',
      meta: { title: '水票管理', subtitle: '水票', icon: 'menu_waterTicket', permissions: ['waterTicket.query'] },
      hidden: true
    },
    {
      path: '/waterTicket/edit',
      component: () => import('@/views/waterTicket/edit'),
      name: 'waterTicket-edit',
      meta: { title: '水票修改', subtitle: '水票修改', icon: 'menu_waterTicket',  },
      hidden: true
    },
    {
      path: '/freight/list',
      component: () => import('@/views/freight/list'),
      name: 'freight-list',
      meta: { title: '运费模板', subtitle:'运费',icon: 'menu_freight', permissions: ['freight.query'] },
      hidden: true
    },
    {
      path: '/task/task',
      component: () => import('@/views/login/paymentPage'),
      name: 'freight-list',
      meta: { title: '运费模板', subtitle:'运费',icon: 'menu_freight', permissions: ['freight.query'] },
      hidden: true
    },
    // {
    //   path: '/product/list',
    //   component: () => import('@/views/product/list'),
    //   name: 'product-list',
    //   meta: { title: '商品档案',subtitle:'商品', icon: 'menu_product', permissions: ['product.query'] }
    // },
    {
      path: '/product/productExport',
      component: () => import('@/views/product/productExport'),
      name: 'product-productExport',
      meta: { title: '导入导出', icon: 'menu_product', permissions: ['product.export'] },
      hidden: true
    },
    // {
    //   path: '/thirdProduct/edit',
    //   component: () => import('@/views/thirdProduct/edit'),
    //   name: 'thirdProduct-edit',
    //   meta: { title: '第三方商品详情', icon: 'menu_product' },
    //   hidden: true
    // },
    {
      path: '/product/add',
      component: () => import('@/views/product/add'),
      name: 'product-add',
      meta: { title: '新增商品', icon: 'menu_product' },
      hidden: true
    },
    {
      path: '/product/edit',
      component: () => import('@/views/product/edit'),
      name: 'product-edit',
      meta: { title: '修改商品', icon: 'menu_product' },
      hidden: true
    },
    {
      path: '/product/index',
      component: () => import('@/views/product/index'),
      name: 'product-index',
      meta: { title: '商品详情', icon: 'menu_product' },
      hidden: true
    },

    {
      path: '/productCategory/add',
      component: () => import('@/views/productCategory/add'),
      name: 'productCategory-add',
      meta: { title: '新增商品分类', icon: 'menu_product' },
      hidden: true
    },
    {
      path: '/productCategory/edit',
      component: () => import('@/views/productCategory/edit'),
      name: 'productCategory-edit',
      meta: { title: '修改商品分类', icon: 'menu_product' },
      hidden: true
    },
    {
      path: '/productCategory/list',
      component: () => import('@/views/productCategory/list'),
      name: 'productCategory-list',
      meta: { title: '商品详情分类', icon: 'menu_product' },
      hidden: true
    },
    {
      path: '/scenicspot/add',
      component: () => import('@/views/scenicspot/add'),
      name: 'scenicspot-add',
      meta: { title: '线路添加', icon: 'menu_product' },
      hidden: true
    },
    {
      path: '/scenicspot/edit',
      component: () => import('@/views/scenicspot/edit'),
      name: 'scenicspot-edit',
      meta: { title: '修改线路', icon: 'menu_product' },
      hidden: true
    },
    {
      path: '/scenicspot/list',
      component: () => import('@/views/scenicspot/list'),
      name: 'scenicspot-list',
      meta: { title: '线路管理', icon: 'menu_product' },
      hidden: true
    },
    // {
    //   path: '/freight/list',
    //   component: () => import('@/views/freight/list'),
    //   name: 'freight-list',
    //   meta: { title: '运费模板', subtitle:'运费',icon: 'menu_freight', permissions: ['freight.query'] }
    // },
    // {
    //   path: '/waterTicket/list',
    //   component: () => import('@/views/waterTicket/list'),
    //   name: 'waterTicket-list',
    //   meta: { title: '水票管理', subtitle:'水票',icon: 'menu_waterTicket', permissions: ['waterTicket.query'] }
    // },
    // {
    //    path: '/meal/list',
    //    component: () => import('@/views/meal/list'),
    //    name: 'meal-list',
    //    meta: { title: '套餐设置',subtitle:'套餐', icon: 'menu_freight', permissions: ['meal.query'] }
    // },
    // {
    //   path: '/thirdProduct/list',
    //   component: () => import('@/views/thirdProduct/list'),
    //   name: 'thirdProduct-list',
    //   meta: { title: '京东库',subtitle:'京东', icon: 'menu_product', permissions: ['thirdProduct.query'] }
    // },

  ]

}
export default productRouter
